/*
 * globe_var.c
 *
 */

#include "globe_var.h"
#include "imu_process.h"

//GSensor 335
unsigned short gADXL335_Normal_X = 0;
unsigned short gADXL335_Normal_Y = 0;
unsigned short gADXL335_Normal_Z = 0;
unsigned short gADXL335_45_X = 0;
unsigned short gADXL335_45_Y = 0;

//GSensor 345
double gADXL345_mg[3] = {0};
double gADXL345_45_mg[3] = {0};

//M HMC5883
double HMC5883_M[3] = {0};
short sGet_Magnetometer_Timeout = 0;
double sMx_Bias = 0.0;
double sMy_Bias = 0.0;
double sMagnetometer_Bias_factor = 0.0;
double Heading_by_Magnetometer = 0.0;

//Gyro L3G4200D
double L3G4200D_Value[3] = {0};
double gGyro_bias_aveg = 0;
double gBias_aveg[3] = {0};

//Acc and M LSM303DLH
double lsm303_A[3] = {0};
double lsm303_M[3] = {0};

//Pressure MS5xxx 
double MS_pressure = 0;
double MS_temperature = 0;
double MS_altitude = 0;
double Calculate_P0 = 0;
double movavg_altitude = 0;

//Murata
unsigned short gMurata_Y = 0, gMurata_Z = 0;


//DR
double gLongitude_imu;
double gLatitude_imu;
double gGpsHeading = 0;
double gMagHeading = 0;
unsigned char Car_State_Azimuth = 0;
double gRoll = 0;
double gPitch = 0;
double gLast_Gx = 0;
double gLast_Gy = 0;
double gInn = 0;
char gAx_go_or_back = 0;
unsigned char gGpsState = 0;
long gMillage = 0;
double gRG_Angle = 0;

